home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
TPUG Xtras
/
Xtras
/
progdisk.d64
/
hangman
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2009-02-07
|
5KB
|
151 lines
10 POKE53280,0:POKE53281,0
20 POKE 808,237
30 PRINT"[147][158]"
50 FORQ=1TO30:X=INT(RND(1)*39)+1:Y=INT(RND(1)*20)+1
60 POKE1024+Y*40+X,ASC("."):POKE55296+Y*40+X,7
70 NEXTQ
80 REM LOAD SPRITE
100 FORI=12800TO12863:READX:POKEI,X:NEXT
110 V=53248
120 POKEV+21,4:REM ENABLE SPRITE
130 POKE2042,200
140 POKEV+41,17
150 POKEV+29,0:POKEV+23,0
160 POKEV+5,75
170 POKEV+4,50
180 POKEV+16,4
190 POKEV+2,50
200 PRINTTAB(4)" "
210 PRINTTAB(4)" [220] [166] [166][166][166] [220][168][166] [166][166][166] [166][166][166][166][166] [166][166][166] [220][168][166] "
220 PRINTTAB(4)" [220] [166] [220] [166] [220] [166] [220] [220] [166] [166] [220] [166] [220] [166] "
230 PRINTTAB(4)" [166][166][166] [166][166][166] [220] [166] [220] [166][166] [220] [166] [166] [166][166][166] [220] [166] "
240 PRINTTAB(4)" [220] [166] [220] [166] [220] [166] [220] [166] [220] [166] [220] [166] [220] [166] "
250 PRINTTAB(4)" [220] [166] [220] [166] [220] [166] [220] [166] [220] [166] [220] [166] [220] [166] "
260 PRINTTAB(4)" [220] [166] [220] [166] [220] [166] [220] [166] [220] [166] [220] [166] [220] [166] "
270 PRINTTAB(4)" [220] [166] [220] [166] [220] [166] [166][166][166] [220] [166] [220] [166] [220] [166] "
280 PRINTTAB(4)" [220] [166][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168] "
290 PRINTTAB(4)" "
300 GOSUB470
310 FORI=1TO24
320 PRINT""
330 FORL=1TO35:NEXTL:NEXTI
340 FOR I=1TO15
350 : POKE V+5,75+I
360 NEXTI
370 FOR I=1TO90:POKEV+5,90-I
380 NEXTI
390 POKEV+21,0:POKE53281,0:POKE53280,2
400 PRINTCHR$(142)"[147]":GOSUB1390
410 PRINT" PLEASE WAIT!"
420 PRINT" NEXT PROGRAM LOADING."
430 PRINT"[144]LOAD "CHR$(34)"HANGMAN.MAIN"CHR$(34)",8"
440 POKE198,5:POKE631,13:POKE632,82:POKE633,85:POKE634,78:POKE635,13
450 NEW
460 END
470 REM-NEWTUN- ORIGINAL COMPOSITION BY D.RITTER
480 K=232
490 S=54272:DIMF(96):D=50
491 DATA 240,0,0,30,0,0,3,192,0,1,240,0,1,248,0,0
492 DATA 252,0,0,126,0,0,126,0,0,62,0,0,63,0,0,63
493 DATA 0,0,63,0,0,62,0,0,126,0,0,126,0,0,252,0
494 DATA 1,248,0,1,240,0,3,224,0,31,0,0,248,0,0,255
500 DATA58,58,44,1,2,1,59,59,44,1,2,0,58,58,32,1,2,1,59,59,32,1,2,0
510 DATA70,70,44,1,2,1,59,59,44,1,2,0,58,58,32,1,2,1,59,59,32,1,2,0
520 DATA68,68,44,1,2,1,59,59,44,1,2,0,58,58,32,1,2,1,59,59,32,1,2,0
530 DATA62,62,44,1,2,1,59,59,44,1,2,0,63,63,32,1,2,1,59,59,32,1,2,0
540 DATA56,56,42,1,2,1,57,57,42,1,2,0,56,56,30,1,2,1,57,57,30,1,2,0
550 DATA68,68,42,1,2,1,57,57,42,1,2,0,56,56,30,1,2,1,57,57,30,1,2,0
560 DATA66,66,42,1,2,1,57,57,42,1,2,0,56,56,30,1,2,1,57,57,30,1,2,0
570 DATA54,54,42,1,2,1,57,57,42,1,2,0,56,56,30,1,2,1,57,57,30,1,2,0
580 DATA56,56,38,1,2,1,57,57,38,1,2,0,56,56,26,1,2,1,57,57,26,1,2,0
590 DATA68,68,38,1,2,1,57,57,38,1,2,0,56,56,26,1,2,1,57,57,26,1,2,0
600 DATA54,54,37,1,2,1,56,56,37,1,2,0,54,54,25,1,2,1,56,56,25,1,2,0
610 DATA00,53,37,0,1,1,00,53,37,0,0,0,00,49,25,0,1,1,00,49,25,0,0,0
620 DATA56,56,38,1,2,1,57,57,38,1,2,0,56,56,26,1,2,2,57,57,38,1,2,2
630 DATA68,68,26,1,2,1,57,57,26,1,2,0,56,56,38,1,2,1,00,57,38,1,2,0
640 DATA00,56,37,0,1,1,00,56,37,0,0,0,00,56,37,0,0,0,00,56,37,0,0,0
650 DATA99,99,99,2,2,1
660 F1=253.18:FORI=1TO96:F(I)=F1*2^(1/12):F1=F(I):NEXT
670 FORI=0TO28:POKES+I,0:NEXT
680 W1=64:W2=64:W3=32:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=15:S2=15:S3=15
690 R1=12:R2=12:R3=12:GOTO1000
700 IFK=32THENK=96 :GOTO800
710 IFK=96THENK=128:GOTO820
720 IFK=128THENK=160:RESTORE:FORZZ=12800TO12863:READ:GOTO840
730 IFK=160THENK=224:GOTO860
740 IFK=224THENK=457 :GOTO880
750 IFK=64THENK=64 :GOTO900
760 IFK=64THENK=64 :GOTO920
770 IFK=64THENK=64 :GOTO940
780 IFK=64THENK=64 :GOTO960
790 IFK=30THENK=64 :GOTO980
800 W1=64:W2=64:W3=32:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=15:S2=15:S3=15
810 R1=11:R2=11:R3=10:GOTO1000
820 W1=16:W2=32:W3=32:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=14:S2=14:S3=15
830 R1=12:R2=12:R3=14:GOTO1000
840 W1=16:W2=16:W3=64:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=15:S2=15:S3=15
850 R1=10:R2=10:R3=14:GOTO1000
860 W1=32:W2=32:W3=64:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=10:S2=10:S3=15
870 R1=11:R2=11:R3=14:GOTO1000
880 W1=16:W2=16:W3=32:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=15:S2=15:S3=15
890 R1=14:R2=12:R3=12:GOTO1000
900 W1=16:W2=16:W3=32:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=15:S2=15:S3=15
910 R1=10:R2=10:R3=14:GOTO1000
920 W1=16:W2=16:W3=32:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=15:S2=15:S3=15
930 R1=10:R2=10:R3=14:GOTO1000
940 W1=16:W2=16:W3=32:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=15:S2=15:S3=15
950 R1=10:R2=10:R3=14:GOTO1000
960 W1=16:W2=16:W3=32:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=15:S2=15:S3=15
970 R1=10:R2=10:R3=14:GOTO1000
980 W1=64:W2=16:W3=32:L=15:A1=1:A2=1:A3=1:D1=1:D2=1:D3=1:S1=15:S2=15:S3=15
990 R1=10:R2=10:R3=14:GOTO1000
1000 FORI=0TO2:T=I*7:POKES+3+T,8:POKES+2+T,0:NEXTI
1010 POKES+24,L
1020 X1=A1*16+D1:Y1=S1*16+R1
1030 POKES+5,X1:POKES+6,Y1
1040 POKES+4,8:POKES+4,0
1050 X2=A2*16+D2:Y2=S2*16+R2
1060 POKES+12,X2:POKES+13,Y2
1070 POKES+11,8:POKES+11,0
1080 X3=A3*16+D3:Y3=S3*16+R3
1090 POKES+19,X3:POKES+20,Y3
1100 POKES+18,8:POKES+18,0
1110 READA,B,C,P,Q,Q1
1120 IFA=99ORA=-1THEN1370
1130 IFP1=1THEN1180
1140 POKES,F(A)-256*INT(F(A)/256)
1150 POKES+1,F(A)/256
1160 POKES+4,W1+1
1170 IFP=1THEN1220
1180 IFQ=0THEN1220
1190 POKES+11,W2+1
1200 POKES+7,F(B)-256*INT(F(B)/256)
1210 POKES+8,F(B)/256
1220 IFQ1=0THEN1260
1230 POKES+18,W3+1
1240 POKES+14,F(C)-256*INT(F(C)/256)
1250 POKES+15,F(C)/256
1260 POKES+4,W1
1270 IFQ=1ORQ=0THEN1290
1280 POKES+11,W2
1290 IFQ1=1ORQ1=0THEN1310
1300 POKES+18,W3
1310 FORI=1TOD:NEXT
1320 TC=TC+1
1330 IFTC=KTHENGOTO700
1340 IFP=1THENP1=1-P1:GOTO1110
1350 P1=0
1360 GOTO1110
1370 IFA=99THENPOKES+4,W1:POKES+11,W2:POKES+18,W3:FORI=1TO50*D:NEXT
1380 FORI=1TO9:POKES+24,9-I:FORI=0TO28:POKES+I,0:NEXT:RETURN
1390 PRINT"": REM STOP SIGN
1400 FORI=1TO16:PRINT"";:NEXT
1410 PRINTTAB(28)" [169] [223]"
1420 PRINTTAB(28)"[169] [223]"
1430 PRINTTAB(28)" [146][161] [182] "
1440 PRINTTAB(28)" [146][161]STOP[182] "
1450 PRINTTAB(28)" [146][161] [182] "
1460 PRINTTAB(28)"[223] [146][169]"
1470 PRINTTAB(28)" [223] [146][169]"
1480 PRINT"":RETURN